﻿using BUS;
using DAO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineDigitalCameraWebsite.Admin
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadDS();
            }
        }

        private void LoadDS()
        {
            OrdersBUS oBUS = new OrdersBUS();
            gvDS.DataSource = oBUS.GetListTop5();
            gvDS.DataBind();
            SearchCountBUS sBUS = new SearchCountBUS();
            gvDSTuKhoa.DataSource = sBUS.GetListCountTop10();
            gvDSTuKhoa.DataBind();
        }

        protected void gvDS_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {

        }

        protected void gvDS_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            gvDS.PageIndex = e.NewPageIndex;
            LoadDS();
        }

        
         
    }
}